import { getMedicalOrderDetailService } from '@/api/medicine'
import type { OrderDetail } from '@/types/medicine'
import { onMounted, ref } from 'vue'
export const useMedicine = (id: string) => {
  const orderDetail = ref<OrderDetail>()
  const getOrderDetail = async () => {
    const res = await getMedicalOrderDetailService(id)
    orderDetail.value = res
  }
  onMounted(() => {
    getOrderDetail()
  })
  return {
    orderDetail,
    getOrderDetail,
  }
}
